import { lazy } from 'react'
import { AppstoreOutlined } from '@ant-design/icons'
import Layout from '@/layout'

export const routes: SyncRoute['DefaultRoutes'][] = [
  {
    path: '/login',
    component: lazy(() => import('@/pages/Login'))
  },
  {
    path: '/',
    redirect: '/index',
    element: <Layout />,
    children: [
      {
        path: 'index',
        name: 'index',
        component: lazy(() => import('@/pages/Homepage/home')),
        meta: {
          title: '首页',
          icon: <AppstoreOutlined />
        }
      }
    ]
  },
  {
    path: '*',
    component: lazy(() => import('@/pages/Error/404'))
  }
]

export default routes
